home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BMUG PD-ROM BV3
/
BMUG PD-ROM Version BV3 (CDRM1097900).iso
/
Programming
/
Programming Utilities
/
Randoms
/
main
< prev
next >
Wrap
Text File
|
1991-09-21
|
550b
|
35 lines
program RandTest;
uses
Randoms;
const
MAXINT = 400;
NUMPERHOLE = 200;
var
numbers: array[1..MAXINT] of integer;
loop: Longint;
index: integer;
begin
InitRandoms;
for loop := 1 to 10000 do
begin
{• UNCOMMENT ONE OF THESE THREE INDEX ASSIGNMENTS •}
{index := normal((200), 50, 5);}
{index := uniform(1, 400, 5);}
{index := exponent(20, 5);}
numbers[index] := numbers[index] + 1;
end;
ShowDrawing;
for loop := 1 to MAXINT do
begin
Moveto(loop, trunc(numbers[loop] * (100 / NUMPERHOLE)));
Line(0, 1);
end;
end.